<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" id="qwe">
    <select id="btn1">
        <option value="+">+</option>
        <option value="-">-</option>
        <option value="*">*</option>
        <option value="/">/</option>
        <option value="%">%</option>
    </select>
    <input type="text" id="asd">
    <input type="button" id="btn2" value="=">
    <input type="text" disabled id="result">
</body>
<script>
    var qwe = document.getElementById("qwe");
    var btn1 = document.getElementById("btn1");
    var asd = document.getElementById("asd");
    var btn2 = document.getElementById("btn2");
    var result = document.getElementById("result");

    btn2.onclick = function(){
        var num1 = Number(qwe.value);
        var num2 = Number(asd.value);

        computed(num1,num2,btn1.value);
    }

    function computed(num1,num2,btn1){
        var sum = 0;

        if('+'){
            sum = num1 + num2;
        }else if('-'){
            sum = num1 - num2;
        }else if('*'){
            sum = num1 * num2;
        }else if('/'){
            sum = num1 / num2;
        }else if('%'){
            sum = num1 % num2;
        }
        
        result.value = sum;
    }
</script>
</html>